package org.jctc.els.modules.biz.service.projects.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jctc.els.modules.biz.entity.projects.ElsProjectReportDaxiu;
import org.jctc.els.modules.biz.mapper.projects.ElsProjectReportDaxiuMapper;
import org.jctc.els.modules.biz.service.projects.IElsProjectReportDaxiuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ElsProjectReportDaxiuServiceImpl implements IElsProjectReportDaxiuService {

    @Autowired
    ElsProjectReportDaxiuMapper elsProjectReportDaxiuMapper;

    @Override
    public ElsProjectReportDaxiu getProjectId(Long projectId) {
        return elsProjectReportDaxiuMapper.selectOne(new QueryWrapper<ElsProjectReportDaxiu>().eq("project_id",projectId));
    }

    @Override
    public Integer save(ElsProjectReportDaxiu elsProjectReportDaxiu) {
        return elsProjectReportDaxiuMapper.insert(elsProjectReportDaxiu);
    }

    @Override
    public Integer update(ElsProjectReportDaxiu elsProjectReportDaxiu) {
        return elsProjectReportDaxiuMapper.updateById(elsProjectReportDaxiu);
    }
}
